<%@ page import="DOMAIN.ThoughtItem" %>

<html>
<head>
<title>Editer idée</title>
 <link rel="stylesheet" href="style.css">
</head>
<body>	

<div id="topNav" >
<%@ include file="menu.jsp" %>	
</div>
<div id="content"  >
<h2 ><span>&Eacute;diter </span>id&eacute;e</h2>
 <div id="leftContent">
	<% 
		ThoughtItem bi = ((ThoughtItem)request.getAttribute("ThoughtItem"));
		
		if(bi==null)
		{
	 %>

	<span class="error">Aucune item associ&eacute;e</span>
	<%
	}
	else
	{ 
	 %>
	<form name="firstForm" method="post" action="DetailThoughtItem?id=<%= bi.GetId() %>"  >
	<fieldset>
    <label>Titre</label>
    <input type="text" name="titre" value="<%= bi.GetTitle() %>" >
    <label>Description</label>
    <textarea name="description" ><%= bi.GetDescription() %></textarea>
    </fieldset>
	
	<input type=submit value=modifier >
	
	</form>
<% } %>

    
     </div>
    <div id="rightContent">
    <h3>Action</h3>    
    <p>
    <ul>
    <% if(bi!=null) {%><li>
    <a href="DetailThoughtItem?id=<%= bi.GetId() %>" >Annuler</a></li> 
    <%}%>
    <li><a href="ListThoughtItem" >Retour liste</a></li>
    </ul>
    </p>
    </div>
    </div>
</body>
</html>
